﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Reddit.Data
{
    static class Util
    {
        public static string NameToId(string name)
        {
            return name != null && name.Contains('_') ?
                name.Substring(name.IndexOf('_') + 1) :
                name;
        }
        public static string IdToName(string kind, string id)
        {
            return id == null || id.Contains('_') ? id : kind + "_" + id;
        }
    }
}
